/**
 * @param {number} n
 * @return {number}
 */
var countVowelStrings = function (n) {
  let count = 0,
    letters = ['a', 'e', 'i', 'o', 'u'],
    visited = new Array(5).fill(n),
    arr = []
  backtrack(0)

  function backtrack(index) {
    if (arr.length == n) {
      count++
      return
    }
    for (let i = index; i < letters.length; i++) {
      // if (visited[i]) {
      //   arr.push(letters[i])

      //   backtrack(i)
      //   arr.pop()
      // } else {
        arr.push(letters[i])
        backtrack(i)
        arr.pop()
    //   }
    }
  }

  return count
}

countVowelStrings(33)
